Method and apparatus providing a multi-function terminal for a power supply controller

ABSTRACT

A power supply controller having a multi-function terminal. In one embodiment, a power supply controller for switched mode power supply includes a drain terminal, a source terminal, a control terminal and a multi-function terminal. The multi-function terminal may be configured in a plurality of ways providing any one or some of a plurality of functions including on/off control, external current limit adjustments, under-voltage detection, over-voltage detection and maximum duty cycle adjustment. The operation of the multi-function terminal varies depending on whether a positive or negative current flows through the multi-function terminal. A short-circuit to ground from the multi-function terminal enables the power supply controller. A short-circuit to a supply voltage from the multi-function terminal disables the power supply controller. The current limit of an internal power switch of the power supply controller may be adjusted by externally setting a negative current from the multi-function terminal. The multi-function terminal may also be coupled to the input DC line voltage of the power supply through a resistance to detect an under-voltage condition, an over-voltage condition and/or adjust the maximum duty cycle of power supply controller. Synchronization of the oscillator of the power supply controller may also be realized by switching the multi-function terminal to power or ground at the desired times.

BACKGROUND OF THE INVENTION

[0001] 1. Field of the Invention

[0002] The present invention relates generally to power supplies and,more specifically, the present invention relates to a switched modepower supply controller.

[0003] 2. Background Information

[0004] Electronic devices use power to operate. Switched mode powersupplies are commonly used due to their high efficiency and good outputregulation to power many of today's electronic devices. In a knownswitched mode power supply, a low frequency (e.g. 50 Hz or 60 Hz mainsfrequency), high voltage alternating current (AC) is converted to highvoltage direct current (DC) with a diode rectifier and capacitor. Thehigh voltage DC is then converted to high frequency (e.g. 30 to 300 kHz)AC, using a switched mode power supply control circuit. This highfrequency, high voltage AC is applied to a transformer to transform thevoltage, usually to a lower voltage, and to provide safety isolation.The output of the transformer is rectified to provide a regulated DCoutput, which may be used to power an electronic device. The switchedmode power supply control circuit provides usually output regulation bysensing the output controlling it in a closed loop.

[0005] A switched mode power supply may include an integrated circuitpower supply controller coupled in series with a primary winding of thetransformer. Energy is transferred to a secondary winding from theprimary winding in a manner controlled by the power supply controller toprovide the clean and steady source of power at the DC output. Thetransformer of a switched mode power supply may also include anotherwinding called a bias or feedback winding. The bias winding provides theoperating power for the power supply controller and in some cases italso provides a feedback or control signal to the power supplycontroller. In some switched mode power supplies, the feedback orcontrol signal can come through an opto-coupler from a sense circuitcoupled to the DC output. The feedback or control signal may be used tomodulate a duty cycle of a switching waveform generated by the powersupply controller or may be used to disable some of the cycles of theswitching waveform generated by the power supply controller to controlthe DC output voltage.

[0006] A power supply designer may desire to configure the power supplycontroller of a switched mode power supply in a variety of differentways, depending on for example the particular application and/oroperating conditions. For instance, there may be one application inwhich the power supply designer would like the power supply controllerto have one particular functionality and there may be anotherapplication in which the power supply designer would like the powersupply controller to have another particular functionality. It would beconvenient for power supply designer to be able to use the sameintegrated power supply controller for these different functions.

[0007] In order to provide the specific functions to the power supplycontroller, additional pins or electrical terminals are added for eachfunction to the integrated circuit power supply controllers.Consequently, each additional function generally translates into anadditional pin on the power supply controller chip, which translatesinto increased costs and additional external components. Anotherconsequence of providing additional functionality to power supplycontrollers is that there is sometimes a substantial increase in powerconsumption by providing the additional functionality.

SUMMARY OF THE INVENTION

[0008] Power supply controller methods and apparatuses are disclosed. Inone embodiment, a power supply controller circuit is described includinga current input circuit coupled to receive a current. In one embodiment,the current input circuit is to generate an enable/disable signal inresponse to the current. The power supply controller is to activate anddeactivate the power supply in response to the enable/disable signal. Inanother embodiment, a current limit of a power switch of the powersupply controller is adjusted in response to the current. In yet anotherembodiment, a maximum duty cycle of the power switch of the power supplyis adjusted in response to the current. Additional features and benefitsof the present invention will become apparent from the detaileddescription, figures and claims set forth below.

BRIEF DESCRIPTION OF THE DRAWINGS

[0009] The present invention detailed illustrated by way of example andnot limitation in the accompanying figures.

[0010]FIG. 1 is a schematic illustrating one embodiment of a powersupply including a power supply controller having a multi-functionterminal in accordance with the teachings of the present invention.

[0011]FIG. 2A is a schematic illustrating one embodiment of a powersupply controller having a multi-function terminal configured to limitthe current of the power switch in the power supply controller to adesired value in accordance with the teachings of the present invention.

[0012]FIG. 2B is a schematic illustrating one embodiment of a powersupply having a multi-function terminal configured to provide aswitchable on/off control to the power supply in accordance with theteachings of the present invention.

[0013]FIG. 2C is a schematic illustrating one embodiment of the powersupply having a multi-function terminal configured to limit the currentof the power switch in the power supply controller to a desired valueand provide a switchable on/off control to the power supply controllerin accordance with the teachings of the present invention.

[0014]FIG. 2D is a schematic illustrating one embodiment of a powersupply having a multi-function terminal configured to provide lineunder-voltage detection, line over-voltage detection and maximum dutycycle reduction of the power supply in accordance with the teachings ofthe present invention.

[0015]FIG. 2E is a schematic illustrating one embodiment of a powersupply having a multi-function terminal configured to provide lineunder-voltage detection, line over-voltage detection, maximum duty cyclereduction and a switchable on/off control to the power supply inaccordance with the teachings of the present invention.

[0016]FIG. 2F is a schematic illustrating one embodiment of current modecontrol of a power supply controller having a multi-function terminalconfigured to regulate the current limit of the power switch in responseto the power supply output in accordance with the teachings of thepresent invention.

[0017]FIG. 3 is a block diagram illustrating one embodiment of a powersupply controller including a multi-function terminal in accordance withteachings of the present invention.

[0018]FIG. 4 is a schematic illustrating one embodiment of a powersupply controller including a multi-function terminal in accordance withthe teachings of the present invention.

[0019]FIG. 5 is a diagram illustrating one embodiment of currents,voltages and duty cycles in relation to current through a multi-functionterminal of a power supply controller in accordance with teachings ofthe present invention.

[0020]FIG. 6A is a diagram illustrating one embodiment of timingdiagrams of switching waveforms of a power supply controller including amulti-function terminal in accordance with teachings of the presentinvention.

[0021]FIG. 6B is a diagram illustrating another embodiment of timingdiagrams of switching waveforms of the power supply controller includinga multi-function terminal in accordance with teachings of the presentinvention.

[0022]FIG. 7 is a schematic illustrating another embodiment of a powersupply controller including a multi-function terminal in accordance withthe teachings of the present invention.

[0023]FIG. 8 is a diagram illustrating another embodiment of timingdiagrams of switching waveforms of the power supply controller includinga multi-function terminal in accordance with teachings of the presentinvention.

DETAILED DESCRIPTION

[0024] A method and an apparatus providing a multi-function terminal ina power supply controller is disclosed. In the following description,numerous specifically details are set forth in order to provide athorough understanding of the present invention. It will be apparent,however, to one having ordinary skill in the art that the specificdetail need not be employed to practice the present invention. In otherinstances, well-known materials or methods have not been described indetail in order to avoid obscuring the present invention.

[0025] In one embodiment of the present invention, a power supplycontroller is provided with the functionality of being able to remotelyturn on and off the power supply. In another embodiment, the powersupply controller is provided with the functionality of being able toexternally set the current limit of a power switch in the power supplycontroller, which makes it easier to prevent saturation of thetransformer reducing transformer size and cost. Externally settablecurrent limit also allows the maximum power output to be kept constantover a wide input range reducing the cost of components that wouldotherwise have to handle the excessive power at high input voltages. Inyet another embodiment, the power supply controller is provided with thefunctionality of being able to detect an under-voltage condition in theinput line voltage of the power supply so that the power supply can beshutdown gracefully without any glitches on the output. In still anotherembodiment, the power supply controller is provided with thefunctionality of being able to detect an over-voltage condition in theinput line voltage of the power supply so that the power supply can beshut down under this abnormal condition. This allows the power supply tohandle much higher surge voltages due to the absence of reflectedvoltage and switching transients on the power switch in the power supplycontroller. In another embodiment, the power supply controller isprovided with the functionality of being able to limit the maximum dutycycle of a switching waveform generated by a power supply controller tocontrol the DC output of the power supply. In so doing, saturation ofthe transformer during power up is reduced and the excess powercapability at high input voltages is safely limited. Increased dutycycle at low DC input voltages also allows for smaller input filtercapacitance. Thus, this feature results in cost savings on manycomponents in the power supply including the transformer. In yet anotherembodiment, some or all of the above functions are provided with asingle multi-function terminal in the power supply controller. That is,in one embodiment, a plurality of additional functions are provided topower supply controller without the consequence of adding acorresponding plurality of additional terminals or pins to theintegrated circuit package of the power supply controller. In oneembodiment, one or some of the above functions are available whenpositive current flows into the multi-function terminal. In anotherembodiment, one or some of the above functions are available whennegative current flows out from the multi-function terminal. In oneembodiment, the voltage at the multi-function terminal is fixed at aparticular value depending on whether positive current flows into themulti-function terminal or whether negative current flows out from themulti-function terminal.

[0026] The multi-function features listed above not only save cost ofmany components and improve power supply performance but also, they savemany components that would otherwise be required if these features wereimplemented externally.

[0027]FIG. 1 is a block diagram illustrating one embodiment of a powersupply 101 including a power supply controller 139 having amulti-function terminal 149 in accordance with the teachings of thepresent invention. As illustrated, power supply 101 includes an AC mainsinput 103, which is configured to receive an AC voltage input. A dioderectifier 105 is coupled to AC mains input to rectify the AC voltage.Capacitor 107 is coupled to diode rectifier 105 to convert the rectifiedAC into a steady DC line voltage 109, which is coupled to a primarywinding 111 of a transformer. Zener diode 117 and diode 119 are coupledacross primary winding 111 to provide clamp circuitry.

[0028] As illustrated in FIG. 1, primary winding 111 is coupled to adrain terminal 141 of power supply controller 139. Power supplycontroller 139 includes a power switch 147 coupled between the drainterminal 141 and a source terminal 143, which is coupled to ground. Whenpower switch 147 is turned on, current flows through primary winding 111of the transformer. When current flows through primary winding 111,energy is stored in the transformer. When power switch 147 is turnedoff, current does not flow through primary winding 111 and the energystored in the transformer is transferred to secondary winding 113 andbias winding 115.

[0029] A DC output voltage is produced at DC output 125 through diode121 and capacitor 123. Zener diode 127, resistor 129 and opto-coupler131 form feedback circuitry or regulator circuitry to produce a feedbacksignal received at a control terminal 145 of the power supply controller139. The feedback or control signal is used to regulate or control thevoltage at DC output 125. As the voltage across DC output 125 risesabove a threshold voltage determined by Zener diode 127, resistor 129and opto-coupler 131, additional feedback current flows into controlterminal 145. In one embodiment, control terminal 145 also provides asupply voltage for circuitry of power supply controller 139 through biaswinding 115, diode 133, capacitor 135 and capacitor 137.

[0030] As shown in FIG. 1, power supply controller 139 includes amulti-function terminal 149, which in one embodiment enables powersupply controller 139 to provide one or a plurality of differentfunctions, depending on how multi-function terminal 149 is configured.Some examples of how multi-function terminal 149 may be configured areshown in FIGS. 2A through 2F.

[0031] For instance, FIG. 2A is a diagram illustrating one embodiment ofa power supply controller 139 including a resistor 201 coupled betweenthe multi-function terminal 149 and the source terminal 143. In oneembodiment, the source terminal 143 is coupled to ground. In oneembodiment, the voltage at multi-function terminal 149 is fixed whennegative current flows from multi-function terminal 149. In oneembodiment, the negative current that flows through resistor 201 is usedto set externally the current limit of power switch 147. Thus, the powersupply designer can choose a particular resistance for resistor 201 toset externally the current limit of power switch 147. In one embodiment,resistor 201 may be a variable resistor, a binary weighted chain ofresistors or the like. In such embodiment, the current limit of powerswitch 147 may be adjusted externally by varying the resistance ofresistor 201. In one embodiment, the current limit of power switch 147is directly proportional to the negative current flowing throughresistor 201.

[0032]FIG. 2B is a diagram illustrating another embodiment of a powersupply controller 139 including a switch 203 coupled betweenmulti-function terminal 149 and source terminal 143. In one embodiment,source terminal 143 is coupled to ground. In one embodiment, powersupply controller 139 switches power switch 147 when multi-functionterminal 149 is coupled to ground through switch 203. In one embodiment,power supply controller 139 does not switch power switch 147 whenmulti-function terminal 149 is disconnected from ground through switch203. In particular, when an adequate amount of negative current flowsfrom multi-function terminal 149, power supply 101 is enabled. Whensubstantially no current flows from multi-function terminal 149, powersupply 101 is disabled. In one embodiment, the amount of current thatflows from multi-function terminal 149 to ground through switch 203 islimited. Thus, in one embodiment, even if multi-function terminal 149 isshort-circuited to ground through switch 203, the amount of currentflowing from multi-function terminal 149 to ground is limited to a safeamount.

[0033]FIG. 2C is a diagram illustrating yet another embodiment of apower supply controller 139 including resistor 201 and switch 203coupled in series between multi-function terminal 149 and sourceterminal 143, which in one embodiment is ground. The configurationillustrated in FIG. 2C combines the functions illustrated and describedin connection with FIGS. 2A and 2B above. That is, the configurationillustrated in FIG. 2C illustrates a power supply controller 139 havingexternal adjustment of the current limit of power switch 147, throughthe selection of the resistance for resistor 201, and on/offfunctionality through switch 203. When switch 203 is on, power supplycontroller 139 will switch power switch 147 with a current limit set byresistor 201. When switch 203 is off, power supply controller 139 willnot switch power switch 147 and power-supply 101 will be disabled.

[0034]FIG. 2D is a diagram illustrating still another embodiment of apower supply controller 139 including a resistor 205 coupled between theline voltage 109 and multi-function terminal 149. Referring briefly backto FIG. 1 above, DC line voltage 109 is generated at capacitor 107 andis input to the primary winding 111 of the transformer of power supply101. Referring back the FIG. 2D, in one embodiment, multi-functionterminal 149 is substantially fixed at a particular voltage whenpositive current flows into multi-function terminal 149. Therefore, theamount of positive current flowing through resistor 205 intomulti-function terminal 149 is representative of line voltage 109, whichis input to the primary winding 111. Since the positive current flowingthrough resistor 205 into multi-function terminal 149 represents theline voltage 109, power supply controller 139 can use this positivecurrent to sense an under-voltage condition in line voltage 109 in oneembodiment. An under-voltage condition exists when the line voltage 109is below a particular under-voltage threshold value. In one embodiment,if a line under-voltage condition is detected, power switch 147 is notswitched by power supply controller 139 until the under-voltagecondition is removed.

[0035] In one embodiment, power supply controller 139 can use thepositive current flowing through resistor 205 into multi-functionterminal 149 to detect an over-voltage condition in line voltage 109. Anover-voltage condition when line voltage 109 rises above a particularover-voltage threshold value. In one embodiment, if a line over-voltagecondition is detected, power switch 147 is not switched by power supplycontroller 139 until the over-voltage condition is removed.

[0036] In one embodiment, power supply controller 139 can also use thepositive current flowing through resistor 205 and multi-functionterminal 149 to detect for increases or decreases in line voltage 109.As line voltage 109 increases, for a given fixed maximum duty cycle, themaximum power available to secondary winding 113 in power supply 101 ofFIG. 1 usually increases. As line voltage 109 decreases, less power isavailable to secondary winding 113 in power supply 101. In most cases,the excess power available at the DC output 125 is undesirable underoverload conditions due to high currents that need to be handled bycomponents. In some instances, it is also desirable to increase themaximum power available to DC output 125 at low input DC voltages tosave on cost of the input filter capacitor 107. Higher duty cycle at lowDC input voltage allows lower input voltage operation for a given outputpower. This allows larger ripple voltage on capacitor 107, whichtranslates to a lower value capacitor. Therefore, in one embodiment,power supply controller 139 adjusts the maximum duty cycle of aswitching waveform used to control or regulate power switch 147 inresponse to increases or decreases in line voltage 109. In oneembodiment, the maximum duty cycle of the switching waveform used tocontrol power switch 147 is inversely proportional to the line voltage109. As mentioned earlier, reducing the duty cycle with increasing inputDC voltage has many advantages. For instance, it reduces the value andhence the cost of capacitor 107. In addition, it limits excess power athigh line voltages reducing the cost of the clamp circuit (117, 119),the transformer and the output rectifier 121 due to reduced maximumpower ratings on these components.

[0037] It is appreciated that since only a single resistor 201 toground, or a single resistor 205 to line voltage 109, is utilized forimplementing some of the functions of power supply controller 139, apower savings is realized. For instance, if a resistor divider were tobe coupled between power and ground, and a voltage output of theresistor divider coupled to a terminal of power supply controller 139were to be used, current would continuously flow through both theresistor divider and into a sensor terminal of the power supplycontroller. This would result in increased power consumption. However inone embodiment of the power supply controller 139, only the singleresistor 201 to ground or single resistor 205 to line voltage 109 isutilized, thereby eliminating the need for a current to flow throughboth the resistor divider and into power supply controller 139.

[0038]FIG. 2E is a diagram illustrating yet another embodiment of apower supply controller 139 including resistor 205, as described above,coupled between the line voltage 109 and multi-function terminal 149.FIG. 2E also includes a switch 207 coupled between control terminal 145and multi-function terminal 149. In one embodiment, resistor 205provides the same functionality as discussed above in connection withFIG. 2D. Therefore, when switch 207 is switched off, the configurationillustrated in FIG. 2E is identical to the configuration described abovein connection with FIG. 2D.

[0039] In one embodiment, control terminal 145 provides a supply voltagefor power supply controller 139 in addition to providing a feedback orcontrol signal to power supply controller 139 from DC output 125. As aresult, in one embodiment, switch 207 provides in effect a switchablelow resistance connection between a supply voltage (control terminal145) and multi-function terminal 149. In one embodiment, the maximumpositive current that can flow into multi-function terminal 149 islimited. Therefore, in one embodiment, even when switch 207 provides, ineffect, a short-circuit connection from a supply voltage, the positivecurrent that flows into multi-function terminal 149 is limited to a safeamount. However, in one embodiment, the positive current that does flowthrough switch 207, when activated, into multi-function terminal 149triggers an over-voltage condition. As discussed above, power supply 139discontinues switching power switch 147 during an over-voltage conditionuntil the condition is removed. Therefore, switch 207 provides on/offfunctionality for power supply controller 139. When switch 207 is theactivated, the low resistance path to control terminal 145 is removedand the positive current flowing into multi-function terminal 149 islimited to the current that flows from line voltage 109 through resistor205. Assuming that neither an under-voltage condition nor anover-voltage condition exists, power supply controller 139 will resumeswitching power switch 147, thereby re-enabling power supply 101.

[0040]FIG. 2F is a diagram illustrating another embodiment of a powersupply controller 139 using current mode control to regulate the currentlimit of the power supply. As shown, resistor 201 is coupled between themulti-function terminal 149 and the source terminal 143 and thetransistor 209 of an opto-coupler coupled between multi-functionterminal 149 and a bias supply, such as for example control terminal145. Similar to FIG. 2A, the negative current that flows out frommulti-function terminal 149 is used to set externally the current limitof power switch 147. In the embodiment illustrated in Figure in FIG. 2F,the current limit adjustment function can be used for controlling thepower supply output by feeding a feedback signal from the output of thepower supply into multi-function terminal 149. In the embodimentdepicted in FIG. 2F, the current limit is adjusted in a closed loop toregulate the output of the power supply (known as current mode control)by adding the opto-coupler output between multi-function terminal 149and the bias supply.

[0041] In one embodiment, the power supply controller configurationsdescribed in connection with FIGS. 2A through 2F all utilize the samemulti-function terminal 149. Stated differently, in one embodiment, thesame power supply controller 139 may be utilized in all of theconfigurations described. Thus, the presently described power controller139 provides a power supply designer with added flexibility. As aresult, a power supply designer may implement more than one of the abovefunctions at the same time using the presently described power supplycontroller 139. In addition, the same functionality may be implementedin more than one way. For example, power supply 101 can be remotelyturned on and off using either power or ground. In particular, the powersupply 101 can be turned on and off by switching to and from the controlterminal (supply terminal for the power supply controller) using theover-voltage detection feature, or by switching to and from ground usingthe on/off circuitry.

[0042]FIGS. 2A though 2F provide just a few examples of use of themulti-function terminal. A person skilled in the art will find manyother configurations for use of the multifunction pin. The uses for themultifunction terminal, are therefore, not limited to the few examplesshown.

[0043] It is worthwhile to note that different functions of thepresently described power supply controller 139 may be utilized atdifferent times during different modes of operation of power supplycontroller 139. For instance, some features may be implemented duringstartup operation, other functions may be implemented during normaloperation, other functions may be implemented during fault conditions,while still other functions may be implemented during standby operation.Indeed, it is appreciated that a power supply designer may implementother circuit configurations to use with a power supply controller 139in accordance with teachings of the present invention. Theconfigurations illustrated in FIGS. 2A through 2F are provided simplyfor explanation purposes.

[0044]FIG. 3 is a block diagram illustrating one embodiment of a powersupply controller 139 in accordance with teachings of the presentinvention. As shown in the embodiment illustrated, power supplycontroller 139 includes a current input circuit 302, which in oneembodiment serves as multi-function circuitry. In one embodiment,current input circuit 302 includes a negative current input circuit 304and a positive current input circuit 306. In one embodiment, negativecurrent input circuit 304 includes negative current sensor 301, on/offcircuitry 309 and external current limit adjuster 313. In oneembodiment, positive current input circuit 306 includes positive currentsensor 305, under-voltage comparator 317, over-voltage comparator 321and maximum duty cycle adjuster 325.

[0045] As shown in FIG. 3, negative current sensor 301 and positivecurrent sensor 305 are coupled to multi-function terminal 149. In oneembodiment, negative current sensor 301 generates a negative currentsense signal 303 and positive current sensor generates a positivecurrent sense signal 307. For purposes of this description, a negativecurrent may be interpreted as current that flows out of multi-functionterminal 149. Positive current may be interpreted as current that flowsinto multi-function terminal 149. In one embodiment, on/off circuitry309 is coupled to receive negative current sense signal 303. Externalcurrent limit adjuster 313 is coupled to receive negative current sensesignal 303.

[0046] In one embodiment, under-voltage comparator 317 is coupled toreceive positive current sense signal 307. Over-voltage comparator 321is coupled to receive positive current sense signal 307. As discussedearlier, both under-voltage and over-voltage comparators also functionas on/off circuits. Maximum duty cycle adjuster 325 is also coupled toreceive positive current sense signal 307.

[0047] In one embodiment, on/off circuitry 309 generates an on/offsignal 311, under-voltage comparator 317 generates an under-voltagesignal 319 an over-voltage comparator 321 generates an over-voltagesignal 323. As shown in the embodiment illustrated in FIG. 3,enable/disable logic 329 is coupled to receive the on/off signal 311,the under-voltage signal 319 and the over-voltage signal 323. Theunder-voltage and over-voltage signals can also be used for on/offfunctions as noted earlier.

[0048] In one embodiment, enable/disable logic 329 generates anenable/disable signal 331, which is coupled to be received by controlcircuit 333. The control circuit 333 is also coupled to receive acontrol signal from control terminal 145. In addition, control circuit333 is also coupled to receive a drain signal from drain terminal 141, amaximum duty cycle adjustment signal 327 from maximum duty cycleadjuster 325 and an external current limit adjustment signal 315 fromexternal current limit adjuster 313.

[0049] In one embodiment, control circuit 333 generates a switchingwaveforms 335, which is coupled to be received by power switch 147. Inone embodiment, power switch 147 is coupled between drain terminal 141and source terminal 143 to control a current flowing through the primarywinding 111 of power supply 101, which is coupled to drain terminal 141.

[0050] In one embodiment, negative current sensor 301 senses currentthat flows out of negative current sensor 301 through multi-functionterminal 149. Negative current sense signal 303 is generated in responseto the current that flows from negative current sensor 301 throughmulti-function terminal 149. In one embodiment, current that flows fromnegative current sensor 301 through multi-function terminal 149typically flows through an external resistance or switch coupled betweenmulti-function terminal 149 and ground.

[0051] In one embodiment, positive current sensor 305 senses currentthat flows into positive current sensor 305 through multi-functionterminal 149. Positive current sense signal 307 is generated in responseto the current that flows into positive current sensor 305 throughmulti-function terminal 149. In one embodiment, current that flows intopositive current sensor 305 through multi-function terminal 149typically flows through an external resistance coupled betweenmulti-function terminal 149 and the DC line voltage 109 input to theprimary winding 111 of a power supply 101 and/or another voltage source.In another embodiment the current flows through an external resistanceor a switch coupled between the multi-function terminal 149 and anothervoltage source. In one embodiment, the line voltage 109 input to primarywinding 111 is typically a rectified and filtered AC mains signal.

[0052] As mentioned above, in one embodiment, positive current does notflow while negative current flows, and vice versa. In one embodiment,the negative current sensor 301 and positive current sensor 305 aredesigned in such a way that they are not active at the same time. Stateddifferently, negative current sense signal 303 is not active at the sametime as positive current sense signal 307 in one embodiment.

[0053] In one embodiment, the voltage at multi-function terminal 149 isfixed at a first level when negative current flows out of power supplycontroller 139 from multi-function terminal 149. In one embodiment, thefirst level is selected to be approximately 1.25 volts. In oneembodiment, the voltage at multi-function terminal is fixed at a secondlevel when positive current flows into power supply controller 139through multi-function terminal 149. In one embodiment, the second levelis selected to be approximately 2.3 volts.

[0054] In one embodiment, on/off circuitry 309 generates on/off signal311 in response to negative current sense signal 303. In one embodiment,when the current flowing from multi-function terminal 149 through anexternal resistance to ground is less than a predetermined on/offthreshold level, on/off circuitry 309 generates on/off signal 311 toswitch off the power supply 101. In one embodiment, when the currentflowing from multi-function terminal 149 is greater than a predeterminedon/off threshold level, on/off circuitry 309 generates on/off signal 311to switch on the power supply 101. In one embodiment, the magnitude ofthe on/off to threshold level is approximately 40 to 50 microamps,including hysteresis.

[0055] In one embodiment, external current limit adjuster 313 generatesexternal current limit adjustment signal 315 in response to negativecurrent sense signal 303. In one embodiment, when the magnitude of thenegative current flowing from multi-function terminal 149 through anexternal resistance or switch to ground is below a predetermined level,the current limit adjuster 313 generates an external current limitadjustment signal to limit the current flowing through power switch 147.In one embodiment, when the magnitude of the negative current flowingfrom multi-function terminal 149 is below a predetermined level, thecurrent flowing through power switch 147 is limited to an amountdirectly proportional to the current flowing out of power supplycontroller 139 from multi-function terminal 149. In one embodiment,predetermined level is approximately 150 microamps. In one embodiment,if the magnitude of the negative current flowing out of power supplycontroller 139 from multi-function terminal 149 is greater than thepredetermined level, the current flowing through power switch 147 isinternally limited or clamped to a fixed safe maximum level. Therefore,the current flowing through power switch 147 is clamped to a safe value,even when multi-function terminal 149 is shorted to ground. In oneembodiment, the current flowing through power switch 147 is internallylimited or clamped to value of 3 amps.

[0056] In one embodiment, since the voltage at multi-function terminal149 is fixed at a particular voltage when current flows out of powersupply controller 139 through multi-function terminal 149, the currentlimit through power switch 147 can be accurately set externally with asingle large value, low-cost, resistor externally coupled betweenmulti-function terminal 149 and ground. By using a large externalresistance, the current flowing from multi-function terminal 149 isrelatively small. As mentioned above, the current flowing frommulti-function terminal 149 in one embodiment is in the microamp range.Since the current flowing from multi-function terminal 149 is relativelysmall, the amount of power dissipated is also relatively small.

[0057] In one embodiment, multi-function terminal 149 is coupled to theDC line voltage 109 input to the primary winding 111 through an externalresistance. In one embodiment, the amount of current flowing intomulti-function terminal 149 represents the DC input line voltage to thepower supply 101. In one embodiment, under-voltage comparator 317generates under-voltage signal 319 in response to the resulting positivecurrent sense signal 307. In one embodiment, when the current flowinginto multi-function terminal 149 rises above a first predeterminedthreshold, under-voltage comparator 317 generates under-voltage signal319 to enable the power supply. In one embodiment, when the currentflowing into multi-function terminal 149 falls below a secondpredetermined threshold, under-voltage comparator 317 generatesunder-voltage signal 319 to disable the power supply. In one embodiment,the first predetermined threshold is greater than the secondpredetermined threshold to provide hysteresis. By providing hysteresisor a hysteretic threshold, unwanted switching on and off of the powersupply 101 resulting from noise or ripple is reduced. In one embodiment,the first predetermined threshold is approximately 50 microamps and thesecond predetermined threshold is approximately 0 microamps. In anotherembodiment, a hysteretic threshold is not utilized. Thus the hysteresisis greater than or equal to zero.

[0058] In one embodiment, over-voltage comparator 321 generatesover-voltage signal 323 in response to the positive current sense signal307. In one embodiment, when the current flowing into multi-functionterminal 149 rises above a third predetermined threshold, over-voltagecomparator 321 generates over-voltage signal 323 to disable the powersupply. In one embodiment, when the current flowing into multi-functionterminal 149 falls below a fourth predetermined threshold, over-voltagecomparator 321 generates over-voltage signal 323 to enable the powersupply. In one embodiment, the third predetermined threshold is greaterthan the fourth predetermined threshold to provide hysteresis. Byproviding hysteresis or a hysteretic threshold, unwanted switching onand off of the power supply resulting from noise is reduced. In oneembodiment, the third predetermined threshold is approximately 225microamps and the fourth predetermined threshold is approximately 215microamps. In one embodiment, the third and fourth predeterminedthresholds are selected to be approximately four to five times greaterthan the first predetermined threshold discussed above for an AC mainsinput 103 of approximately 85 volts to 265 volts AC. In anotherembodiment, a hysteretic threshold is not utilized. Thus the hysteresisis greater than or equal to zero.

[0059] In one embodiment, power switch 147 is able to tolerate highervoltages when not switching. When the power supply is disabled, powerswitch 147 does not switch. Therefore, it is appreciated thatover-voltage comparator 321 helps to protect the power supply 101 fromunwanted input power surges by disabling the power switch 147.

[0060] In one embodiment, over-voltage and under-voltage comparators 321and 317 may also be used for on/off functionality, similar to on/offcircuitry 309. In particular, multi-function terminal 149 may beswitchably coupled to a on/off control signal source to provide apositive current that flows into multi-function terminal 149 that crossthe under-voltage or over-voltage thresholds (going above the third orbelow the fourth predetermined thresholds). For example, when thepositive current through the multifunction pin crosses above the firstpredetermined threshold of the under-voltage comparator 317, the powersupply will be enabled and when the positive current goes below thesecond predetermined threshold of the under-voltage comparator 317, thepower supply is disabled. Similarly, when the positive current throughthe multifunction pin crosses above the third predetermined threshold ofthe over-voltage comparator 321, the power supply will be disabled andwhen the positive current goes below the fourth predetermined thresholdof the over-voltage comparator 321, the power supply is enabled.

[0061] In one embodiment, maximum duty cycle adjuster 325 generatesmaximum duty cycle adjustment signal 327 in response to the positivecurrent sense signal 307. In one embodiment, maximum duty cycleadjustment signal 327, which is received by control circuit 333, is usedto adjust the maximum duty cycle of the switching waveform 335 used tocontrol power switch 147. In one embodiment, the maximum duty cycledetermines how long a power switch 147 can be on during each cycle. Forexample, if the maximum duty cycle is 50 percent, the power switch 147can be on for a maximum of 50 percent of each cycle.

[0062] Referring briefly for example to the power supply 101 of FIG. 1,while power switch 147 is on, power is stored in the transformer corethrough the primary winding 111. While the power switch 147 is off,power is delivered from the transformer core to the secondary winding ofthe transformer in power supply 101. To delivery a given power level,for a lower DC input voltage 109, a higher duty cycle is required andfor a higher DC input voltage 109, a lower duty cycle is required. Inone embodiment of the present invention, maximum duty cycle adjuster 325decreases the maximum duty cycle of power switch 147 in response toincreases in the DC input voltage 109. In one embodiment, maximum dutycycle adjuster 325 increases the maximum duty cycle of power switch 147in response to decreases in the DC input voltage 109. Stateddifferently, the maximum duty cycle is adjusted to be inverselyproportional to the current that flows into multi-function terminal 149in one embodiment of the present invention.

[0063] Referring back to FIG. 3, in one embodiment, the maximum dutycycle is adjusted within a range of 33 percent to 75 percent based onthe amount of positive current that flows into multi-function terminal149. In one embodiment, maximum duty cycle adjuster 325 does not beginto decrease the maximum duty cycle until the amount of current thatflows into multi-function terminal 149 rises above a threshold value. Inone embodiment, that threshold value is approximately 60 microamps. Inone embodiment, the maximum duty cycle is not adjusted if negativecurrent flows out of multi-function terminal 149. In this case, themaximum duty cycle is fixed at 75 percent in one embodiment of thepresent invention.

[0064] In one embodiment, enable/disable logic 329 receives as inputon/off signal 311, under-voltage signal 319 and over-voltage signal 323.In one embodiment, if any one of the under-voltage or over-voltageconditions exist, enable/disable logic 329 disables power supply 101. Inone embodiment, when the under-voltage and over-voltage conditions areremoved, enable/disable logic 329 enables power supply 101. In oneembodiment, power supply 101 may be enabled or disabled by starting andstopping, respectively, the switching waveform 335 at the beginning of aswitching cycle just before the power switch is to be turned on. In oneembodiment, enable/disable logic 329 generates enable/disable signal331, which is received by the oscillator in the control circuit 333 tostart or stop the oscillator at the beginning of a switching cycle ofswitching waveform 335. When enabled the oscillator will start a new oncycle of the switching waveform. When disabled the oscillator willcomplete the current switching cycle and stop just before the beginningof the next cycle.

[0065] In one embodiment, control circuit 333 generates switchingwaveform 335 to control power switch 147 in response to a current sensesignal received from drain terminal 141, enable/disable signal 331,maximum duty cycle adjustment signal 327, a control signal from controlterminal 145 and external current limit adjustment signal 315.

[0066] In one embodiment, the enable/disable signal can also be used tosynchronize the oscillator in the control circuit to an external on/offcontrol signal source having a frequency less than that of theoscillator. The on/off control signal can be input to the multi-functionterminal through any of the three paths that generate the enable/disablesignal: on/off circuitry 309, under-voltage comparator 317 orover-voltage comparator 321. As discussed, enable/disable the oscillatorin the control circuit 333, in one embodiment, begins a new completecycle of switching waveform at 335 using known techniques in response toenable/disable signal 331, which represents the on/off control signal atthe multi-function input. By turning the on/off control signal “on” atthe multi-function input for a fraction of the switching cycle and then“off,” the oscillator is enabled to start a new complete cycle.Therefore, if the external on/off control signal has short “on” pulsesat a frequency less than the oscillator in the control circuit, theoscillator will produce a switching cycle each time an on pulse isdetected, thus providing a switching waveform that is synchronized tothe external frequency.

[0067] In an alternate embodiment shown below in FIG. 7, theenable/disable signal 331 directly disables or turns off the powerswitch through the AND gate 493 when an under-voltage or over-voltagecondition exists. In this embodiment, the power switch can be enabled ordisabled in the middle of a cycle and consequently, synchronization ofthe switching waveform through a on/off control signal at themulti-function input is not provided.

[0068]FIG. 4 is a schematic of one embodiment of a power supplycontroller 139 in accordance with the teachings of the presentinvention. As illustrated, negative current sensor 301 includes acurrent source 401 coupled to control terminal 145. Transistors 403 and405 form a current mirror coupled to current source 401. In particular,transistor 403 has a source coupled to current source 401 and a gate anddrain coupled to the gate of transistor 405. The source of transistor405 is also coupled to current source 401. Transistor 407 is coupledbetween the drain and gate of transistor 403 and multi-function terminal149. In one embodiment, the gate of transistor 407 is coupled to a bandgap voltage V_(BG) plus a threshold voltage V_(TN). In one embodiment,V_(BG) is approximately 1.25 volts, V_(TN) is approximately 1.05 voltsand V_(BG)+V_(TN) is approximately 2.3 volts. Transistors 411 and 413also form a current mirror coupled to the drain of transistor 405. Inparticular, the gate and drain of transistor 411 are coupled to thedrain of transistor 405 and the gate of transistor 413. In oneembodiment, negative current sense signal 303 is generated at the gateand drain of transistor 411. The sources of transistors 411 and 413 arecoupled to ground. In one embodiment, ground is provided through sourceterminal 143.

[0069] In one embodiment, on/off circuitry 309 includes a current source409 coupled between the drain of transistor 413 and control terminal145. In one embodiment, on/off signal 311 is generated at the drain oftransistor 413.

[0070] In one embodiment, external current limit adjuster 313 includes acurrent source 415 coupled between control terminal 145 and the drain oftransistor 419 and the gate and drain of transistor 421. The source oftransistor 419 and the source of transistor 421 are coupled to ground.The gate of transistor 419 is coupled to receive negative current sensesignal 303. External current limit adjuster 313 also includes a currentsource 417 coupled between control terminal 145 and the drain oftransistor 423 and resistor 425. The source of transistor 423 andresistor 425 are coupled to ground. External current limit adjustmentsignal 315 is generated at the drain of transistor 423.

[0071] In one embodiment, positive current sensor 305 includestransistor 429 having a source coupled to multi-function terminal 149and the current mirror formed with transistors 431 and 433. Inparticular, transistor 431 has a gate and drain coupled to the drain oftransistor 429 and the gate of transistor 433. Current source 435 iscoupled between ground and the sources of transistors 431 and 433. Thegate of transistor 429 is coupled to band gap voltage V_(BG). The drainof transistor 433 is coupled to the current mirror formed withtransistors 427 and 437. In particular, the gate and drain of transistor427 are coupled to the gate of transistor 437 and the drain oftransistor 433. The sources of transistors 427 and 437 are coupled tocontrol terminal 145. Positive current sense signal 307 is generated atthe gate and drain of transistor 427.

[0072] In one embodiment, under-voltage comparator 317 includes acurrent source 439 coupled between the drain of transistor 437 andground. Under-voltage signal 319 is generated at the drain of transistor437.

[0073] In one embodiment, over-voltage comparator 321 includes a currentsource 443 coupled between the drain of transistor 441 and ground.Transistor 441 has a source coupled to control terminal 145 and a gatecoupled to receive positive current sense signal 307. Over-voltagesignal 323 is generated at the drain of transistor 441.

[0074] In one embodiment, enable/disable logic 329 includes NOR gate 445having an input coupled to receive under-voltage signal 319 and aninverted input coupled to receive on/off signal 311. Enable/disablelogic 329 also includes NOR gate 447 having an input coupled to receiveover-voltage signal 323 and an input coupled to an output of NOR gate445. Enable/disable signal 331 is generated at the output of NOR gate447.

[0075] In one embodiment, maximum duty cycle adjuster 325 includes atransistor 449 having a source coupled to control terminal 145 and agate coupled to receive positive current sense signal 307. Maximum dutycycle adjuster 325 also includes a current source 453 coupled betweenthe drain of transistor 449 and ground. A diode 451 is coupled to thedrain of transistor 449 to produce maximum duty cycle adjustment signal327.

[0076] In one embodiment, power switch 147 includes a power metal oxidesemiconductor field effect transistor (MOSFET) 495 coupled between drainterminal 141 and source terminal 143. Power MOSFET 495 has a gatecoupled to receive a switching waveform 335 generated by pulse widthmodulator 333.

[0077] In one embodiment, control circuit 333 includes a resistor 455coupled to the control terminal 145. A transistor 457 has a sourcecoupled to resistor 455 and a negative input of a comparator 459. Apositive input of comparator 459 is coupled to a voltage V, which in oneembodiment is approximately 5.7 volts. An output of comparator 459 iscoupled to the gate of transistor 457. The drain of transistor 457 iscoupled to diode 451 and resistor 479. The other end resistor 479 iscoupled to ground. A filter is coupled across resistor 479. The filterincludes a resistor 481 coupled to resistor 479 and capacitor 483coupled to resistor 481 and ground. Capacitor 483 is coupled to apositive input of comparator 477.

[0078] In one embodiment, control circuit 333 is a pulse widthmodulator, which has an oscillator 467 with three oscillating waveformoutputs 471, 473 and 475. Oscillator 467 also includes an enable/disableinput 469 coupled to receive enable/disable signal 331. In oneembodiment, control circuit 333 also includes a voltage dividerincluding resistors 461 and 463 coupled between drain terminal 141 andground. A node between resistors 461 and 463 is coupled to a positiveinput of a comparator 465. A negative input of comparator 465 is coupledto receive external current limit adjustment signal 315.

[0079] In one embodiment, oscillating waveform output 471 is coupled toa first input of AND gate 493. Oscillating waveform output 473 iscoupled to a set input of latch 491. Oscillating waveform output 475 iscoupled to a negative input of comparator 477. An output of comparator465 is coupled to a first input of AND gate 487. A leading edge blankingdelay circuit 485 is coupled between the output of NAND gate 493 and asecond input of AND gate 487. In one embodiment, there is a gate driveror a buffer between the output of the NAND gate 493 and the gate of theMOSFET (not shown). An output of AND gate 487 is coupled to a firstinput of OR gate 489. A second input of OR gate 489 is coupled to anoutput of comparator 477. An output of OR gate 489 is coupled to a resetinput of latch 491. An output of latch 491 is coupled to a second inputof AND gate 493. The output of AND gate 493 generates switching waveform335.

[0080] Operation of power supply controller 139 of FIG. 4 is as follows.Beginning with negative current sensor 301, the gate of transistor 407is fixed at V_(BG)+V_(TN) in one embodiment to approximately 2.3 volts.As a result, transistor 407 sets the voltage at multi-function terminal149 to V_(BG) in one embodiment, which is approximately 1.25 volts, whencurrent is pulled out of multi-function terminal 149. This current maybe referred to as negative current since the current is being pulled outof power supply controller 139. In one embodiment, transistor 407 issized such that it operates with a current density resulting in avoltage drop between the gate and source that is close to V_(TN),wherein the V_(TN) is the threshold of the N channel transistor 407,when negative current flows from multi-function terminal 149.

[0081] When an external resistor (not shown) is coupled frommulti-function terminal 149 to ground, the negative current flowingthrough the external resistor will therefore be V_(BG) divided by thevalue of the external resistor in accordance with Ohm's law. Thisnegative current flowing out from multi-function terminal 149 passesthrough transistors 403 and is mirrored on to transistor 405. Currentsource 401 limits the negative current sourced by multi-functionterminal 149. Therefore, even if multi-function terminal 149 isshort-circuited to ground, the current is limited to a current less thanthe current supplied by current source 401. This current is less thanthe current source 401 by an amount that flows through the transistor405. In one embodiment, the negative current that can be drawn from themulti-function terminal is limited to 200 microamps by the currentsource 401. In one embodiment, if more negative current than currentsource 401 is able to supply is pulled from multi-function terminal 149,the voltage at multi-function terminal 149 collapses to approximately 0volts.

[0082] The current that flows through transistor 403 is mirrored totransistor 405. The current that flows through transistors 405 and 411is the same since they are coupled in series. Since transistors 411 and413 form a current mirror, the current flowing through transistor 413 isproportional to the negative current flowing through multi-functionterminal 149. The current flowing through transistor 413 is compared tothe current provided by current source 409. If the current throughtransistor 413 is greater than the current supplied by current source409, the signal at the drain of transistor 413 will go low, which in oneembodiment enables the power supply. Indeed, on/off signal 311 isreceived at an inverted input of NOR gate 445. Thus, when on/off signal311 is low, the power supply is enabled. Therefore, by having a negativecurrent greater than a particular threshold value, the power supply ofthe present invention is enabled in one embodiment. In one embodiment,the magnitude of that particular threshold value is approximately 50microamps.

[0083] As mentioned above, the current flowing through transistor 411 isproportional to the negative current flowing out from multi-functionterminal 149. As illustrated, transistor 419 also forms a current mirrorwith transistor 411. Therefore, the current flowing through transistor419 is proportional to the current flowing through transistor 411. Thecurrent flowing through transistor 421 is the difference between thecurrent supplied by current source 415 and the current flowing throughtransistor 419. For example, assume that the current supplied by currentsource 415 is equal to A. Assume further that the current flowingthrough transistor 419 is equal to B. In this case, the current flowingthrough transistor 421 is equal to A−B.

[0084] As illustrated, transistor 423 forms a current mirror withtransistor 421. Therefore, the current flowing through transistor 423 isproportional to the current flowing through transistor 421. Continuingwith the example above and assuming further that transistors 421 and 423are equal in size, the current flowing through transistor 423 is alsoequal to A−B. Assuming further that current source 417 supplies acurrent equal to the current supplied by current source 415, which isassumed to be equal to A, then the current flowing through resistor 425would be equal to A−(A−B), which is equal to B.

[0085] Therefore, the current flowing through resistor 425 isproportional to the current flowing through transistor 419, which isproportional to the current flowing through transistor 411, which isproportional to the negative current flowing out from multi-functionterminal 149. Note that if the current flowing through transistor 419 isgreater than the current supplied by current source 415, the currentflowing through transistor 421 would be zero because the voltage at thedrains of transistors 419 and 421 would collapse to approximately zerovolts. This would result in the current flowing through transistor 423to be zero. Thus, the current through resistor 425 cannot be greaterthan the current supplied by current source 417. However, as long as Bis less than A, the current that flows through resistor 425 is equal toB. If B rises above A, the current that flows through resistor 425 isequal to A.

[0086] In one embodiment, resistor 425 is fabricated using the same orsimilar types of processes and diffusions or doped regions used infabricating power MOSFET 495. As a result, the on resistance of resistor425 follows or tracks the on resistance of power MOSFET 495 throughvarying operating conditions and processing variations.

[0087] The voltage across resistor 425 is reflected in external currentlimit adjuster signal 315, which is input to the negative input ofcomparator 465. In one embodiment, the negative input of comparator 465is the threshold input of comparator 465. Therefore, the negative inputof comparator 465 receives a voltage proportional to the negativecurrent flowing out of multi-function terminal 149 multiplied by theresistance of resistor 425.

[0088] The positive input of comparator 465 is coupled to drain terminal141 through resistor 461 of the voltage divider formed by resistor 461and resistor 463. Therefore, the positive input of comparator 465 sensesa voltage proportional to the drain current of power MOSFET 495multiplied by the on resistance of power MOSFET 495.

[0089] When the voltage at the positive terminal of comparator 465 risesabove the voltage provided by external current limit adjuster signal 315to the negative terminal of comparator 465, the output of comparator 465is configured to reset latch 491 through AND gate 487 and OR gate 489.By resetting latch 491, the on portion of a cycle of waveform 335received at the gate of power MOSFET 495 is masked or cut short, whichresults in turning off power MOSFET 495 when the amount of currentflowing through power switch 147 rises above the threshold.

[0090] In one embodiment, AND gate 487 also receives input from leadingedge blanking delay circuitry 485. In one embodiment, leading edgeblanking delay circuitry 485, using known techniques, temporarilydisables current limit detection at the start, or during the leadingedge portion, of an on transition of power MOSFET 495.

[0091] As shown in the embodiment illustrated in FIG. 4, latch 491 isset at the beginning of each cycle by switching waveform output 473. Oneway that latch 491 is reset, thereby turning off power MOSFET 495, isthrough the output of comparator 465. Another way to reset latch 491 isthrough the output of comparator 477, which will be discussed below inconnection with maximum duty cycle adjuster 325.

[0092] With regard to positive current sensor 305, the gate oftransistor 429 is coupled to the band gap voltage V_(BG). In oneembodiment, transistor 429 is sized such that it operates with a currentdensity resulting in a drop between the source and gate close to V_(TP),which is threshold of the P channel transistor 429, when positivecurrent flows into multi-function terminal 149. In one embodiment,current that flows into multi-function terminal 149 is referred to aspositive current since the current is being fed into the power supplycontroller 139. As a result, the voltage at multi-function terminal 149is fixed at approximately V_(BG)+V_(TP) when positive current flows intomulti-function terminal 149.

[0093] The gate voltages on the transistors 407 and 429 chosen in theembodiment discussed above are such that only one of transistors 407 and429 are switched on at a time depending on the polarity of the currentat the multi-function terminal. Stated differently, if transistor 407 ison, transistor 429 is off. If transistor 429 is on, transistor 407 isoff. As result, if negative current sensor 301 is on, positive currentsensor 305 is isolated from multi-function terminal 149. If positivecurrent sensor 305 is on, negative current sensor 301 is isolated frommulti-function terminal 149. Therefore, if there is negative currentflowing through multi-function terminal 149, positive current sensor 305is disabled. If there is positive current flowing through multi-functionterminal 149, negative current sensor 301 is disabled.

[0094] In one embodiment, the positive current that flows intotransistor 429 flows through transistor 431 since they are coupled inseries. The positive current through multi-function terminal 149 flowsinto and is limited by current source 435. In one embodiment, if thepositive current through multi-function terminal 149 is greater than anamount that current source 435 can sink minus the current in transistor433, then the voltage at multi-function terminal 149 will rise and isclamped either by the circuitry driving the current or by the standardclamping circuitry that is used for protection purposes on externalterminals such as the multi-function terminal, of a power supplycontroller. As shown, transistors 431 and 433 form a current mirror.Therefore, the current flowing through transistor 433 is proportional tothe positive current that flows through transistor 431. The current thatflows through the transistor 433 flows to transistor 427 since they arecoupled in series. As shown, the gate of transistor 427 is coupled tothe drain of transistor 427, which generates positive current sensesignal 307.

[0095] Transistors 427 and 437 form a current mirror since the gate anddrain of transistor 427 are coupled to the gate of transistor 437.Therefore, the current flowing through transistor 437 is proportional tothe current flowing through transistor 427, which is proportional to thepositive current. Current source 439 provides a reference current, whichis compared to the current that flows through transistor 437. If thecurrent flowing through transistor 437 rises above the current providedby current source 439, then the voltage at the drain of transistor 437,which is the under-voltage signal 319, goes high. When under-voltagesignal 319 goes high and the output of NOR gate 445 will go low,indicating that there is no under-voltage condition.

[0096] Transistors 427 and 441 also form a current mirror since the gateand drain of transistor 427 are coupled to the gate of transistor 441.Therefore, the current flowing through transistor 441 is proportional tothe current flowing through the transistor 427, which is proportional tothe positive current. Current source 443 provides a reference current,which is compared to current that flows through transistor 441. As longas the current flowing through transistor 441 stays below the currentprovided by current source 443, then the voltage at the drain oftransistor 441, which is the over-voltage signal 323, remains low. Whenover-voltage signal 323 remains low, the output of NOR gate 447 remainshigh assuming that there was no under-voltage condition indicated byunder-voltage signal 319 and no remote off condition indicated by on/offsignal 311.

[0097] The output of NOR gate 447 is enable/disable signal 331. In oneembodiment, enable/disable signal 331 is high if on/off signal 311 islow, or under-voltage signal 319 is high and over-voltage signal 323 islow. Otherwise, enable/disable signal 331 is low.

[0098] In one embodiment, the oscillator 467 receives enable/disablesignal 331 at the start/stop input 469. In one embodiment, oscillator467 generates oscillating waveforms at oscillating waveform outputs 471,473 and 475 while enable/disable signal 331 is high or active. In oneembodiment, oscillator 467 does not generate the oscillating waveformsat oscillating waveform outputs 471, 473 and 475 while enable/disablesignal 331 is low or in-active. In one embodiment, oscillator 467 beginsgenerating oscillating waveforms starting with new complete cycles on arising edge of enable/disable signal 331. In one embodiment, oscillator467 completes existing cycles of the oscillating waveforms generated atoscillating waveform outputs 471, 473 and 475 before stopping thewaveforms in response to a falling edge of enable/disable signal 331.That is, oscillator 467 stops generating the waveforms at a point justbefore the start of an on time of power switch of the next cycle inresponse to a falling edge of enable/disable signal 331.

[0099] In one embodiment, control terminal 145 supplies power to thecircuitry of power supply controller 139 and also provides feedback tomodulate the duty cycle of switching waveform 335. In one embodiment,control terminal 145 is coupled to the output of the power supply 101through a feedback circuit to regulate the output voltage of the powersupply 101. In one embodiment, an increase in the output voltage ofpower supply 101 results in the reduction in the duty cycle of switchingwaveform 335 through feedback received through control terminal 145.Therefore, if the regulation level of the output parameter of powersupply 101 that is being controlled, such as output voltage or currentor power, is exceeded during operation, additional feedback current isreceived through control terminal 145. This feedback current flowsthrough resistor 455 and through a shunt regulator formed by transistor457 and comparator 459. If no feedback current or control terminalcurrent in excess of supply current is received through control terminal145, the current through transistor 457 is zero. If the current throughtransistor 457 is zero, and assuming for the time being that there is nocurrent through the diode 451, the current through resistor 479 is zero.If there is no current flowing through resistor 479, then the voltagedrop across resistor 479 is zero. If there is no voltage drop acrossresistor 479, there is no voltage drop across capacitor 483. As aresult, the output of comparator 477 will remain low. If the output ofcomparator 477 remains low, and assuming for the time being that theoutput of AND gate 487 remains low, the output of latch 491 will remainhigh. In this case, the maximum duty cycle signal, which is produced byoscillator waveform output 471, will be generated at the output of ANDgate 493. Thus, switching waveform 335 will have the maximum duty cycleproduced by oscillator waveform output 471.

[0100] Therefore, when the voltage drop across resistor 479 remains atzero, the maximum duty cycle produced at oscillator waveform output 471is not limited, assuming that the output of AND gate 487 remains low.This is because latch 491 is not reset through the output of comparator477. However, when the feedback current or control terminal current inexcess to the supply current is received through control terminal 145,this feedback current flows through transistor 457. As the amount ofcurrent flowing through the transistor 457 increases, the voltage dropacross resistor 479 increases correspondingly. As a voltage drop acrossresistor 479 increases, the voltage drop across capacitor 483 willincrease. In any given cycle, when the voltage on the oscillatingwaveform output 475 crosses below the voltage across the capacitor 483the output of the comparator will go high and terminate the on-time ofthe switching waveform 335 or turn off the power switch 495. As aresult, the duty cycle (on time as a fraction of the cycle time) of theswitching waveform 335 decreases with increase in voltage drop acrossresistor 479.

[0101] In one embodiment, the oscillating waveform at oscillatingwaveform output 475 is a sawtooth waveform having a duty cycle andperiod equal to the maximum duty cycle waveform generated at oscillatingwaveform output 471. As the voltage drop across resistor 479 increases,the output of comparator 477 will go high closer to the beginning ofeach cycle. When the output of comparator 477 goes high, latch 491 willbe reset through NOR gate 489. When latch 491 is reset, the on time ofthe of switching waveform 335 is terminated for that particular cycleand switching waveform 335 remains low for the remainder of thatparticular cycle. Latch 491 will not be set again until the beginning ofthe next cycle through switching waveform output 473, assuming thatthere is a high or active enable/disable signal 331.

[0102] Referring now to maximum duty cycle adjuster signal 325,transistor 449 includes a source coupled to control terminal 145 and agate coupled the gate and drain of transistor 427 to receive positivecurrent sense signal 307. Transistor 449 and transistor 427 also form acurrent mirror. Therefore, the current flowing through transistor 449 isproportional to the current flowing through transistor 427, which isproportional to the positive current flowing into multi-functionterminal 149. The current that flows through diode 451 is the differencebetween the current that flows through transistor 449 and the currentthat flows into current source 453. The current that flows throughcurrent source 453 is set such that current will not begin to flowthrough diode 451 until the current flowing through transistor 449 risesabove a threshold. In one embodiment, the above threshold value ischosen such that the maximum duty cycle is not reduced until thepositive current flowing into multi-function terminal 149 rises abovethe threshold used for under-voltage comparison. In one embodiment, thethreshold positive current used for under-voltage comparison isapproximately 50 microamps and the threshold positive current used formaximum duty cycle adjustment is approximately 60 microamps.

[0103] When current begins to flows through diode 451, that current willbe combined with current that flows through transistor 457. In oneembodiment, the current that flows through diode 451 is maximum dutycycle adjustment signal 327. The current flowing through transistor 457and diode 451 will flow through resistor 479. As discussed in detailabove, current that flows through resistor 479 will result in thevoltage drop across resistor 479, which results in a reduction in themaximum duty cycle of switching waveform 335. As the current that flowsthrough resistor 479 increases, the maximum duty cycle of switchingwaveform 335 will be decreased.

[0104]FIG. 5 is a diagram illustrating some of the currents, voltagesand duty cycles associated with the power supply controller 139 inaccordance with teachings of the present invention. In particular,diagram 501 illustrates when the power supply is enabled in relation tothe input current of multi-function terminal 149. The x-axis representsthe positive or negative current flowing into or out of multi-functionterminal 149. As illustrated, as positive input current rises from zeroand crosses over 50 microamps, power supply controller 139 in oneembodiment is enabled. At this time, an under-voltage condition isremoved. If the current is above 50 microamps but then falls below zeromicroamps, power supply controller 139 is disabled. At this time, anunder-voltage condition is detected. The difference between 50 microampsand zero microamps provides hysteresis, which provides for more stableoperation during noise or ripple conditions in the input current.

[0105] As the input current rises above 225 microamps, the power supplyis disabled. At this time, an over-voltage condition is detected. Whenthe input current falls back below 215 microamps, the power supply isre-enabled. At this time, the over-voltage condition is removed. Thedifference between 225 microamps and 215 microamps provides hysteresis,which provides for more stable operation during noise or rippleconditions in the input current.

[0106] Continuing with diagram 501, when the negative current that flowsout from multi-function terminal 149 rises in magnitude to a level above50 microamps, which is illustrated as −50 microamps in FIG. 5, the powersupply is enabled. At this time, the on/off feature of the presentinvention turns on the power supply. When the negative current falls inmagnitude to a level below 40 microamps, which is illustrated as −40microamps in FIG. 5, the power supply is disabled. At this time, theon/off feature of the present invention turns off the power supply. Thedifference between −50 microamps and −40 microamps provides hysteresis,which provides for more stable operation during noise or rippleconditions in the input current.

[0107] It is worthwhile to note that in one embodiment the positiveinput current is clamped at 300 microamps and that the negative inputcurrent is clamped at 200 microamps. The positive input current would beclamped at 300 microamps when, for example, the multi-function terminal149 is short-circuited to a supply voltage. The negative input currentwould be clamped at 200 microamps when, for example, the multi-functionterminal is short-circuited to ground.

[0108] In diagram 503, the current limit through power switch 147 asadjusted by the present invention is illustrated. Note that thehysteresis of the under-voltage and over-voltage conditions areillustrated from zero microamps to 50 microamps and from 215 microampsto 225 microamps, respectively. In one embodiment, when positive inputcurrent is provided into multi-function terminal 149 and there isneither an under-voltage condition nor an over-voltage condition, thecurrent limit through power switch 147 is 3 amps. However, when negativecurrent flows out from multi-function terminal 149, and the magnitude ofthe negative current rises above 50 microamps, which is illustrated as−50 microamps in FIG. 5, the current limit through power switch 149 isapproximately 1 amp. As the magnitude of the negative current rises to150 microamps, which is illustrated as −150 microamps in FIG. 5, thecurrent limit through power switch 149 rises proportionally with thenegative current to 3 amps. After the magnitude of the negative currentrises above 150 microamps, the current limit of the power switch 149remains fixed at 3 amps. Note that there is also the on/off hysteresisbetween −50 microamps and −40 microamps in diagram 503.

[0109] Diagram 505 illustrates the maximum duty cycle setting of powersupply controller 139 in relation to the input current. Note that thehysteresis from −50 microamps to −40 microamps, from zero microamps to50 microamps and from to 215 microamps to 225 microamps as discussedabove is included. In the embodiment illustrated in diagram 505, themaximum duty cycle is fixed at 75 percent until a positive input currentof 60 microamps is reached. As the input current continues to increase,the maximum duty cycle continues to decrease until an input current of225 microamps is reached, at which time the maximum duty cycle has beenreduced to 33 percent. As illustrated, between 60 microamps and 225microamps, the maximum duty cycle is inversely proportional to thepositive input current. Note that when negative current flows throughmulti-function terminal 149, and when the power supply is enabled, themaximum duty cycle in one embodiment is fixed at 75 percent.

[0110] Diagram 507 illustrates the voltage at multi-function terminal,which is labeled in diagram 507 as line sense voltage, in relation tothe input current. When negative current is flowing from multi-functionterminal 149, the voltage at multi-function terminal 149 is fixed at theband gap voltage V_(BG), which in one embodiment is 1.25 volts. Whenpositive current is flowing into multi-function terminal 149, thevoltage at multi-function terminal is fixed at the band gap voltageV_(BG) plus a threshold voltage V_(TP), which in one embodiment sum to2.3 volts. In the event that a negative current having a magnitude ofmore than 200 microamps is attempted to be drawn out of themulti-function terminal 149, the voltage at multi-function terminal 149drops to approximately zero volts. In the event that a positive currentof more than 300 microamps flows into multi-function terminal 149, thevoltage at multi-function terminal 149 rises. In this case, the voltagewill be limited by either by a standard clamp used at the multi-functionterminal for the purpose of protection or by the external circuitrydriving the multi-function terminal, whichever is lower in voltage.

[0111] It is appreciated that the currents, voltages, duty cyclesettings and hysteresis settings described in connection with thepresent invention are given for explanation purposes only and that othervalues may be selected in accordance with teachings of the presentinvention. For example, in other embodiments, non hysteretic thresholdsmay be utilized. Thus the hysteresis values may be greater than or equalto zero.

[0112]FIG. 6A is timing diagram illustrating one embodiment of some ofthe waveforms of a power supply controller in accordance with teachingsof the present invention. Referring to both FIGS. 4 and 6A, oscillatingwaveform output 475 of oscillator 467 generates a sawtooth waveform,which is received by comparator 477. Oscillating waveform output 471 ofoscillator 467 generates a maximum duty cycle signal, which is receivedby AND gate 493. Enable/disable signal 331, which is received atenable/disable input 469 of oscillator 467, is also illustrated. In FIG.6A, the enable/disable signal 331 is active. Therefore, the sawtoothwaveform of oscillating waveform output 475 and the maximum duty cyclewaveform of oscillating waveform output 471 are generated. Note that thesawtooth waveform and the maximum duty cycle waveform have the samefrequency and period. One cycle of each of these waveform occurs betweentime 601 and time 605. The peak of the sawtooth waveform occurs at thesame time as the rising edge of the maximum duty cycle waveform. Thisaspect is illustrated at time 601 and at time 605. The lowest point ofthe sawtooth waveform occurs at the same time as the falling edge of themaximum duty cycle waveform. This aspect is illustrated at time 603.

[0113] Referring now to FIG. 6B, a timing diagram illustrating anotherembodiment of the waveforms of a power supply controller in accordancewith teachings of the present invention is shown. From time 607 to time609, the enable/disable signal 331 is low or inactive. In oneembodiment, a low enable/disable signal 331 disables the power supply. Ahigh or active enable/disable signal 331 enables the power supply. Attime 609, the rising edge of enable/disable signal 331 occurs. At thistime, oscillating waveform outputs 475 and 471 begin generating thesawtooth waveform and maximum duty cycle waveform, respectively. Notethat a new complete cycle of each of these waveforms is generated inresponse to the rising edge of enable/disable signal 331 at time 609.

[0114] From time 609 to time 611, enable/disable signal 331 remains highor active. Thus, during this time, the sawtooth waveform and maximumduty cycle waveform are continuously generated.

[0115] At time 611, a falling edge of enable/disable signal 331 occurs.Before oscillator 467 discontinues generating the sawtooth waveform andthe maximum duty cycle waveform, the existing cycles of each of thesewaveforms are allowed to complete. Stated differently, generation of thesawtooth waveform and the maximum duty cycle waveform is discontinued ata point just before the start of the on-time of the switching waveform335 or the on-time of the power switch of the next cycle. This point intime is illustrated in FIG. 6B at time 613. Note that after time 613,the sawtooth waveform remains inactive at a high value and the maximumduty cycle waveform remains inactive at a low value.

[0116] At time 615, another rising edge of enable/disable signal 331occurs. Therefore, the sawtooth waveform and the maximum duty cyclewaveform are generated beginning at a new complete cycle of eachwaveform. As illustrated in FIG. 6B, a falling edge of enable/disablesignal 331 occurs at time 617, which is immediately after the risingedge. However, the sawtooth waveform and maximum duty cycle waveformsare allowed to complete their then existing cycles. This occurs at time619. After time 619, the waveforms remains inactive as shown during thetime between time 619 and time 621, which is when another rising edge ofenable/disable signal 331 occurs. At time 621, another new completecycle of the sawtooth waveform and the maximum duty cycle waveform aregenerated. Since enable/disable signal 331 is deactivated at time 623,which occurs during a cycle of the sawtooth waveform and the maximumduty cycle waveform, these waveforms are deactivated after fullycompleting their respective cycles. Thus, by pulsing the on/off controlsignal at the multi-function terminal it is possible to synchronize theoscillator to the on/off pulse frequency.

[0117]FIG. 7 is a schematic of another embodiment of a power supplycontroller 139 in accordance with the teachings of the presentinvention. The power supply controller schematic shown in FIG. 7 issimilar to the power supply controller schematic discussed above in FIG.4. The primary difference between the power supply controller of FIGS. 4and 7 is that oscillator 467 of FIG. 7 does not have an enable/disableinput 469 coupled to receive enable/disable signal 331. As shown in theembodiment depicted in FIG. 7, the enable/disable signal 331 is used todirectly gate the switching waveform at the input of AND gate 493. Inthis embodiment, the oscillator 467 is running all the time andswitching waveform 335 will be gated on and off at any point in thecycle in response to the enable/disable signal 331.

[0118] To illustrate, FIG. 8 shows one embodiment of timing diagrams ofswitching waveforms of the power supply controller illustrated in FIG.7. Referring to both FIGS. 7 and 8, oscillating waveform output 475 ofoscillator 467 generates a sawtooth waveform, which is received bycomparator 477. Oscillating waveform output 471 of oscillator 467generates a maximum duty cycle signal, which is received by AND gate493. Enable/disable signal 331, which is received by AND gate 493, andthe output of AND gate 493, which is switching waveform 335, are alsoillustrated. In FIG. 8, the enable/disable signal 331 is active onlysome of the time. Therefore, the switching waveform 335 is switchingonly during those portions of time that the enable/disable signal 331 isactive. When the enable/disable signal 331 is not active, switchingwaveform 335 does not switch.

[0119] In the foregoing detailed description, the method and apparatusof the present invention has been described with reference to specificexemplary embodiments thereof. It will, however, be evident that variousmodifications and changes may be made thereto without departing from thebroader spirit and scope of the present invention. The presentspecification and figures are accordingly to be regarded as illustrativerather than restrictive.

What is claimed is:
 1. A power supply controller circuit, comprising acurrent input circuit coupled to receive a current representative of aninput voltage, the current input circuit to generate an enable/disablesignal when the current crosses a threshold having a hysteresis ofgreater than or equal to zero, the power supply controller to activateand deactivate the power supply in response to the enable/disablesignal.
 2. The power supply controller circuit of claim 1 furthercomprising an oscillator circuit coupled to the enable/disable signal,the oscillator circuit to start and stop generating a switching waveformin response to the enable/disable signal.
 3. The power supply controllercircuit of claim 2 wherein the oscillator circuit is to complete anexisting cycle of the switching waveform before the oscillator is tostop generating the switching waveform in response to the enable/disablesignal.
 4. The power supply controller circuit of claim 2 wherein theoscillator circuit is to start a new complete cycle of the switchingwaveform if the oscillator circuit is to start generating the switchingwaveform in response to the enable/disable signal.
 5. The power supplycontroller circuit of claim 2 further comprising a power switch coupledto a primary winding of the power supply, the power switch coupled toreceive and to switch in response to the switching waveform.
 6. A powersupply controller circuit, comprising a current input circuit coupled toreceive a current representative of an input voltage, the current inputcircuit to generate an enable/disable signal to activate the powersupply when the current is in between a first current threshold having afirst hysteresis greater than or equal to zero and second currentthreshold having a second hysteresis greater than or equal to zero, thesecond current threshold higher than the first current threshold, thecurrent input circuit to deactivate the power supply when the current isless than the first current threshold, the current input circuit todeactivate the power supply when the current is greater than the secondcurrent threshold.
 7. The power supply controller circuit of claim 6further comprising an oscillator circuit coupled to the enable/disablesignal, the oscillator circuit to start and stop generating a switchingwaveform in response to the enable/disable signal.
 8. The power supplycontroller circuit of claim 7 wherein the oscillator circuit is tocomplete an existing cycle of the switching waveform before theoscillator is to stop generating the switching waveform in response tothe enable/disable signal.
 9. The power supply controller circuit ofclaim 7 wherein the oscillator circuit is to start a new complete cycleof the switching waveform if the oscillator circuit is to startgenerating the switching waveform in response to the enable/disablesignal.
 10. The power supply controller circuit of claim 7 furthercomprising a power switch coupled to a primary winding of the powersupply, the power switch coupled to receive and to switch in response tothe switching waveform.
 11. A power supply controller circuit,comprising a current input circuit coupled to receive a currentrepresentative of an on/off control signal applied to the power supply,the current input circuit to generate an enable/disable signal toactivate the power supply when the current is in between a first currentthreshold having a first hysteresis greater than or equal to zero andsecond current threshold having a hysteresis greater than or equal tozero, the second current threshold higher than the first currentthreshold, the current input circuit to deactivate the power supply whenthe current is less than the first current threshold, the current inputcircuit to deactivate the power supply when the current is greater thanthe second current threshold.
 12. A power supply controller circuit,comprising: a current input circuit coupled to receive a currentrepresentative of an input voltage applied to a power supply, thecurrent input circuit to generate a maximum duty cycle adjustment signalin response thereto; and a control circuit to generate a switchingwaveform, the control circuit coupled to receive the maximum duty cycleadjustment signal, the control circuit to limit the duty cycle of theswitching waveform to a maximum value in response to the maximum dutycycle adjustment signal, the switching waveform to regulate the powersupply output.
 13. The power supply controller circuit of claim 12further comprising a power switch coupled to a primary winding of thepower supply, the power switch coupled to receive and to switch inresponse to the switching waveform.
 14. The power supply controllercircuit of claim 13 wherein the maximum duty cycle adjustment signal isinversely adjusted by the current representative of the voltage input tothe power supply when the current representative of the voltage input tothe power supply is greater than a first value.
 15. The power supplycontroller circuit of claim 14 wherein the maximum duty cycle adjustmentsignal is independent of the current representative of the voltage inputto the power supply when the current representative of the voltage inputto the power supply is less than the first value.
 16. The power supplycontroller circuit of claim 12 wherein the maximum duty cycle adjustmentsignal is combined with a control signal received by the controlcircuit.
 17. The power supply controller circuit of claim 16 wherein thecontrol circuit is a pulse width modulation circuit that includes acomparator to compare an oscillating sawtooth waveform with the combinedmaximum duty cycle adjustment signal and the control signal received bythe pulse width modulation circuit.
 18. The power supply controllercircuit of claim 17 wherein the duty cycle of the switching waveform isadjusted in response to an output of the comparator.
 19. A power supplycontroller circuit, comprising a current input circuit coupled toreceive a current representative of an on/off control signal applied toa power supply, the current input circuit to generate enable/disablesignal when the current crosses an on/off threshold having a hysteresisgreater than or equal to zero, the power supply controller to activateand deactivate a power supply in response to the on/off control signal.20. The power supply controller circuit of claim 19 further comprisingan oscillator circuit coupled to the enable/disable signal, theoscillator circuit to start and stop generating a switching waveform inresponse to the on/off control signal.
 21. The power supply controllercircuit of claim 20 wherein the oscillator circuit is to complete anexisting cycle of the switching waveform before the oscillator is tostop generating the switching waveform in response to the on/off controlsignal.
 22. The power supply controller circuit of claim 20 wherein theoscillator circuit is to start a new complete cycle of the switchingwaveform if the oscillator circuit is to start generating the switchingwaveform in response to the on/off control signal.
 23. The power supplycontroller circuit of claim 20 further comprising a power switch coupledto a primary winding of the power supply, the power switch coupled toreceive and to switch in response to the switching waveform.
 24. Thepower supply controller circuit of claim 19 wherein the on/off thresholdhas a hysteresis greater than or equal to zero.
 25. A power supplycontroller circuit, comprising: a current input circuit coupled toreceive a current, the current input circuit to generate anenable/disable signal to deactivate a power supply when the magnitude ofcurrent crosses below an on/off threshold having a hysteresis of greaterthan or equal to zero, the current input circuit to activate the powersupply when the current crosses above the on/off threshold, the currentinput circuit to generate a current limit adjustment signal in responseto the current; and a control circuit coupled to receive the currentlimit adjustment signal, the control circuit coupled to adjust thecurrent limit of a current through a power switch in response to thecurrent limit adjustment signal.
 26. The power supply controller circuitof claim 25 wherein the power switch is coupled to a primary winding ofthe power supply.
 27. The power supply controller circuit of claim 26wherein the control circuit is a pulse width modulation circuit thatgenerates a switching waveform coupled to be received by the powerswitch to regulate the power supply output.
 28. The power supplycontroller of claim 27 wherein the current is representative of afeedback signal from the power supply output, wherein the power supplyvoltage is regulated through current limit adjustment of the powerswitch in response to the feedback signal
 29. A power supply controllercircuit, comprising: a current input circuit coupled to receive acurrent for adjusting a current limit of a power switch, the currentinput circuit to generate a current limit adjustment signal in responseto the current; and a control circuit coupled to receive the currentlimit adjustment signal, the control circuit coupled to adjust thecurrent limit of a current through the power switch in response to thecurrent limit adjustment signal.
 30. The power supply controller circuitof claim 29 wherein the power switch is coupled to a primary winding ofthe power supply.
 31. The power supply controller circuit of claim 29wherein the control circuit is a pulse width modulation circuit thatgenerates a switching waveform coupled to be received by the powerswitch to regulate the power supply output.
 32. The power supplycontroller of claim 31 wherein the current is representative of afeedback signal from the power supply output, wherein the power supplyvoltage is regulated through current limit adjustment of the powerswitch in response to the feedback signal
 33. The power supplycontroller of claim 31 wherein the control circuit includes a firstcomparator coupled to compare a voltage representative of the currentthrough the power switch with the current limit adjustment signal suchthat the power switch is disabled in response to an output of the firstcomparator when the current limit set by the current limit adjustmentsignal is exceeded.
 34. The power supply controller of claim 33 whereinthe control circuit is to generate a switching waveform controlled inresponse to the output of the first comparator such that the switchingwaveform is coupled to limit the current through the power switch. 35.The power supply controller circuit of claim 29 wherein the currentlimit of the current through the power switch is adjusted by the currentwhen the current limit of the current through the power switch is belowa predetermined maximum level.
 36. The power supply controller circuitof claim 35 wherein the current limit of the current through the powerswitch is fixed at the predetermined maximum level for magnitudes of thecurrents that are higher than the current value corresponding to thepredetermined maximum current limit level.
 37. The power supplycontroller of claim 29, wherein the current circuit also generates anenable/disable signal that deactivates the power supply when themagnitude of the current is below an on/off threshold, the on/offthreshold having a hysteresis of zero or greater.
 38. The power supplycontroller circuit of claim 37 further comprising an oscillator circuitcoupled to an enable/disable signal, the oscillator circuit to start andstop generating a switching waveform in response to the current crossingthe on/off threshold.
 39. The power supply controller circuit of claim38 wherein the oscillator circuit is to complete an existing cycle ofthe switching waveform before the oscillator is to stop generating theswitching waveform in response to the enable/disable signal.
 40. Thepower supply controller circuit of claim 38 wherein the oscillatorcircuit is to start a new complete cycle of the switching waveform ifthe oscillator circuit is to start generating the switching waveform inresponse to the enable/disable signal.
 41. The power supply controllercircuit of claim 29, wherein the current is received by the currentinput circuit on a low impedance terminal that has a reference voltagewith respect to ground.
 42. The power supply controller in claim 41,wherein the current limit of the power switch is set by the value ofresistance connected between the reference voltage on the low impedanceterminal and ground.
 43. A method for controlling a power supply,comprising: receiving a first current representative of an input voltageto the power supply through a first terminal of a power supplycontroller; activating an under-voltage signal if the first currentfalls below a first under-voltage threshold value; deactivating theunder-voltage signal if the first current rises above a secondunder-voltage threshold value; activating the power supply in responseto a deactivated under-voltage signal; and deactivating the power supplyin response to an activated under-voltage signal.
 44. The method ofclaim 43 wherein activating the switching waveform includes starting anew complete cycle of the switching waveform.
 45. The method of claim 43wherein deactivating the switching waveform includes allowing tocomplete an existing cycle of the switching waveform.
 46. The method ofclaim 43 wherein the second under-voltage threshold value is greaterthan the first under-voltage threshold value.
 47. The method of claim 43further comprising generating a positive current sense signal inresponse to the first current.
 48. The method of claim 43 whereinreceiving the first current representative of the input voltage to thepower supply comprises coupling a resistance between the first terminaland an input of the primary winding.
 49. The method of claim 43 whereinactivating the power supply in response to the deactivated under-voltagesignal comprises enabling a switching waveform in response to thedeactivated under-voltage signal, the switching waveform to control apower switch coupled to a primary winding of the power supply.
 50. Themethod of claim 43 wherein deactivating the power supply in response tothe activated under-voltage signal comprises disabling a switchingwaveform in response to the activated under-voltage signal, theswitching waveform to control a power switch coupled to a primarywinding of the power supply.
 51. A method for controlling a powersupply, comprising: receiving a first current representative of an inputvoltage to the power supply through a first terminal of a power supplycontroller; activating an over-voltage signal if the first current risesabove a first over-voltage threshold value; deactivating theover-voltage signal if the first current falls below a secondover-voltage threshold value; activating the power supply in response toa deactivated over-voltage signal; and deactivating the power supply inresponse to an activated over-voltage signal.
 52. The method of claim 51wherein activating the switching waveform includes starting a newcomplete cycle of the switching waveform.
 53. The method of claim 51wherein deactivating the switching waveform includes allowing tocomplete an existing cycle of the switching waveform.
 54. The method ofclaim 51 wherein the first over-voltage threshold value is greater thanthe second over-voltage threshold value.
 55. The method of claim 51wherein receiving the first current representative of the input voltageto the power supply comprises coupling a resistance between the firstterminal and an input of the primary winding.
 56. The method of claim 51further comprising switchably coupling the first terminal to a firstpotential to switchably generate an over-voltage condition.
 57. Themethod of claim 51 wherein activating the power supply in response tothe deactivated over-voltage signal comprises enabling a switchingwaveform in response to the deactivated over-voltage signal, theswitching waveform to control a power switch coupled to a primarywinding of the power supply.
 58. The method of claim 51 whereindeactivating the power supply in response to the activated over-voltagesignal comprises disabling a switching waveform in response to theactivated over-voltage signal, the switching waveform to control a powerswitch coupled to a primary winding of the power supply.
 59. A methodfor controlling a power supply, comprising: receiving a first currentrepresentative of an input voltage to the power supply through a firstterminal of a power supply controller; switching a second currentflowing through the primary winding with a switching waveform having aduty cycle; adjusting the duty cycle of the switching waveform inresponse to the first current.
 60. The method of claim 59 wherein thelimit to the duty cycle is reduced in response to an increase in thefirst current if the first current is greater than a first thresholdvalue, the first threshold having a hysteresis of greater than or equalto zero.
 61. The method of claim 60 further comprising leaving unchangedthe duty cycle of the switching waveform if the first current is lessthan or equal to the first threshold value.
 62. The method of claim 59wherein adjusting the maximum duty cycle of the switching waveformcomprises: generating a positive current sense signal in response to thefirst current; generating a first voltage in response to the positivecurrent sense signal; comparing the first voltage with a switchingsawtooth waveform; and resetting a latch to limit the maximum duty cycleof the switching waveform in response to comparing the first voltagewith the switching sawtooth waveform.
 63. The method of claim 59 whereinreceiving the first current representative of the input voltage to thepower supply comprises coupling a resistance between the first terminaland an input of the primary winding.
 64. A method for controlling apower supply, comprising: supplying a first current from a firstterminal of a power supply controller; deactivating the power supply ifthe first current supplied from the first terminal falls below a firstthreshold value; and activating the power supply if the first currentsupplied from the first terminal rises above a second threshold value.65. The method of claim 64 wherein deactivating the power supplycomprises stopping a switching waveform to control a power switchcoupled to a primary winding of the power supply.
 66. The method ofclaim 64 wherein activating the power supply comprises starting aswitching waveform to control a power switch coupled to a primarywinding of the power supply
 67. The method of claim 64 wherein thesecond threshold value is greater than the first threshold value. 68.The method of claim 64 further comprising limiting the first currentsupplied from the first terminal to a maximum value.
 69. The method ofclaim 65 wherein stopping the switching waveform includes allowing tocomplete an existing cycle of the switching waveform.
 70. The method ofclaim 66 wherein starting the switching waveform includes starting a newcomplete cycle of the switching waveform.
 71. The method of claim 64further comprising coupling a switch between the first terminal andground.
 72. The method of claim 64 further comprising coupling avariable resistance between the first terminal and ground.
 73. A methodfor controlling a power supply, comprising: supplying a first currentfrom a first terminal of a power supply controller; controlling a secondcurrent flowing through a primary winding of the power supply with apower switch coupled to the primary winding; and adjusting a currentlimit of the second current in response to the first current.
 74. Themethod of claim 73 wherein adjusting the current limit of the secondcurrent comprises increasing the current limit of the second current inresponse to an increase in the first current.
 75. The method of claim 73wherein adjusting the current limit of the second current comprisesdecreasing the current limit of the second current in response to adecrease in the first current.
 76. The method of claim 73 furthercomprising coupling a resistance between the first terminal and ground.77. The method of claim 73 wherein controlling a second current flowingthrough the primary winding comprises: switching the power switch inresponse to a switching waveform; and adjusting the switching waveformin response to the first current.
 78. The method of claim 77 whereinadjusting the switching waveform comprises: generating a first voltagein response to the first current; generating a second voltage inresponse to the second current; and adjusting the switching waveform inresponse to a comparison of the first voltage and the second voltage.79. A power supply controller, comprising: a power switch having a drainterminal, a source terminal and a gate, the drain terminal coupled to aprimary winding of a power supply and the source terminal coupled toground; a control circuit coupled to a control terminal, the drainterminal and the gate of the power switch, the control terminal coupledto an output of the power supply, the control circuit to generate aswitching waveform to control the power switch; multi-function circuitrycoupled between a multi-function terminal and the control circuit, theswitching waveform generated in response to the drain terminal, thecontrol terminal and the multi-function terminal.
 80. The power supplycontroller of claim 79 wherein the multi-function circuitry comprises: anegative current sensor coupled to the multi-function terminal, thenegative current sensor to generate a negative current sense signal inresponse to the multi-function terminal if a voltage at themulti-function terminal is less than a first voltage, the negativecurrent sensor isolated from the multi-function terminal if the voltageat the multi-function terminal is greater than the first voltage; apositive current sensor coupled to the multi-function terminal, thepositive current sensor to generate a positive current sense signal inresponse to the multi-function terminal if the voltage at themulti-function terminal is greater than a second voltage, the positivecurrent sensor isolated from the multi-function terminal if the voltageat the multi-function terminal is less than the second voltage, whereinthe second voltage is greater than the first voltage, the switchingwaveform generated in response to the negative current sense signal andthe positive current sense signal.
 81. The power supply controller ofclaim 80 wherein the multi-function circuitry further comprises on/offcircuitry coupled to receive the negative current sense signal andcoupled to the control circuit, the on/off circuitry to control thecontrol circuit to start and to stop the switching waveform in responseto the multi-function terminal.
 82. The power supply controller of claim80 wherein the multi-function circuitry further comprises externalcurrent limit adjuster circuitry coupled to receive the negative currentsense signal and coupled to the control circuit, the external currentlimit adjuster circuitry control the control circuit to adjust a currentlimit of the power switch in response to a current received at themulti-function terminal.
 83. The power supply controller of claim 80wherein the multi-function function circuitry further comprisesunder-voltage comparator circuitry coupled to receive the positivecurrent sense signal and coupled to the control circuit, theunder-voltage comparator circuitry to control the control circuit tostart and to stop the switching waveform in response to a currentreceived at the multi-function terminal.
 84. The power supply controllerof claim 80 wherein the multi-function circuitry further comprisesover-voltage comparator circuitry coupled to receive the positivecurrent sense signal and coupled to the control circuit, theover-voltage comparator circuitry to control the control circuit tostart and to stop the switching waveform in response to a currentreceived at the multi-function terminal.
 85. The power supply controllerof claim 80 wherein the multi-function circuitry further comprisesmaximum duty cycle adjuster circuitry coupled to receive the positivecurrent sense signal and coupled to the control circuit, the maximumduty cycle adjuster circuitry to adjust the maximum duty cycle of theswitching waveform in response to a current received at themulti-function terminal.
 86. The power supply controller of claim 79wherein a voltage at the multi-function terminal is substantially equalto a first constant voltage if there is a negative current flowingthrough the multi-function terminal.
 87. The power supply controller ofclaim 79 wherein a voltage at the multi-function terminal issubstantially equal to a second constant voltage if there is a positivecurrent flowing through the multi-function terminal.
 88. A method forcontrolling a power supply, comprising: generating a switching waveformto control a power switch of a power supply controller coupled to aprimary winding of the power supply; adjusting the switching waveform inresponse to a drain terminal of the power supply controller coupled tothe primary winding, a voltage at the drain terminal indicating acurrent flowing through the power switch; adjusting the switchingwaveform in response to a control terminal of the power supplycontroller coupled to an output of the power supply; and adjusting theswitching waveform in response to a current flowing through amulti-function terminal of the power supply controller.
 89. The methodof claim 88 wherein adjusting the switching waveform in response to thecurrent flowing through the multi-function terminal comprises generatinga negative current sense signal if the current flowing through themulti-function terminal flows out of the power supply controller fromthe multi-function terminal.
 90. The method of claim 88 whereinadjusting the switching waveform in response to the current flowingthrough the multi-function terminal comprises generating a positivecurrent sense signal if the current flowing through the multi-functionterminal flows into the power supply controller through themulti-function terminal.
 91. The method of claim 89 further comprisingstarting and stopping the switching waveform in response to the negativecurrent sense signal.
 92. The method of claim 89 further comprisingcontrolling the switching waveform to limit the current flowing throughthe power switch in response to the negative current sense signal. 93.The method of claim 90 further comprising starting and stopping theswitching waveform in response to the positive current sense signal. 94.The method of claim 90 further comprising reducing a maximum duty cycleof the switching waveform in response to the positive current sensesignal.
 95. The method of claim 89 further comprising coupling themulti-function terminal to ground through a resistance.
 96. The methodof claim 89 further comprising switchably coupling the multi-functionterminal to ground.
 97. The method of claim 90 further comprisingcoupling the multi-function terminal to an input voltage of the powersupply through a resistance.
 98. The method of claim 90 furthercomprising switchably coupling the multi-function terminal to a firstpotential.
 99. The power supply controller, comprising: a power switchcoupled between a drain terminal and a source terminal, the drainterminal to be coupled to a primary winding of a power supply; a controlcircuit coupled to the power switch, the drain terminal and a controlterminal, the control terminal to be coupled to an output of the powersupply; a negative current sensor coupled to a multi-function terminal;a positive current sensor coupled to the multi-function terminal; aon/off circuit coupled between the negative current sensor and thecontrol circuit; an external current limit adjuster coupled between thenegative current sensor and the control circuit; an under-voltagecomparator coupled between the positive current sensor and the controlcircuit; an over-voltage comparator coupled between the positive currentsensor and the control circuit; and a maximum duty cycle adjustercoupled between the positive current sensor and the control circuit.100. The power supply controller of claim 99 further comprisingenable/disable logic coupled to an output of the under-voltagecomparator, to an output of the over-voltage comparator, to an output ofthe on/off circuit and to an input of the control circuit.
 101. Thepower supply controller of claim 99 wherein the power switch comprises apower transistor coupled between the drain terminal and the sourceterminal, the power transistor having a gate coupled to the controlcircuit.
 102. The power supply controller of claim 99 wherein thenegative current sensor comprises: a first current source coupled to thecontrol terminal; a first transistor having a source coupled to thefirst current source and a gate coupled to a drain of the firsttransistor; a second transistor having a source coupled to the source ofthe first transistor and a gate coupled to the gate of the firsttransistor; a third transistor having a drain coupled to the drain andthe gate of the first transistor and to the gate of the secondtransistor, the third transistor having a source coupled to themulti-function terminal and a gate coupled to a first voltage; and afourth transistor having a drain and gate coupled to the drain of thesecond transistor.
 103. The power supply controller of claim 102 whereinthe on/off circuit comprises: a second current source coupled to thecontrol terminal; and a fifth transistor having a gate coupled to thegate and drain of the fourth transistor and a drain coupled to thesecond current source.
 104. The power supply controller of claim 102wherein the external current limit adjuster comprises: a third currentsource coupled to the control terminal; a fourth current source coupledto the control terminal; a sixth transistor having a gate coupled to thegate and drain of the fourth transistor and a drain coupled to the thirdcurrent source; a seventh transistor having a gate and drain coupled tothe drain of the sixth transistor; an eighth transistor having a gatecoupled to the gate and drain of the seventh transistor, the eighthtransistor having a drain coupled to the fourth current source; and afirst resistor coupled to the fourth current source and the drain of theeighth transistor.
 105. The power supply controller of claim 99 whereinthe positive current sensor comprises: a ninth transistor having asource coupled to the multi-function terminal and a gate coupled to asecond voltage; a tenth transistor having a gate and drain coupled to adrain of the ninth transistor; an eleventh transistor having a gatecoupled to the gate and drain of the tenth transistor; a twelfthtransistor having a source coupled to the control terminal and a gateand drain coupled to a drain of the eleventh transistor; and a fifthcurrent source coupled to a source of the tenth transistor and coupledto a source of the eleventh transistor.
 106. The power supply controllerof claim 105 wherein the under-voltage comparator comprises: athirteenth transistor having a source coupled to the control terminaland having a gate coupled to the gate and drain of the twelfthtransistor; and a sixth current source coupled to a drain of thethirteenth transistor.
 107. The power supply controller of claim 105wherein the over-voltage comparator comprises: the fourteenth transistorhaving a source coupled to the control terminal and having a gatecoupled to the gate and drain of the twelfth transistor; and a seventhcurrent source coupled to a drain of the fourteenth transistor.
 108. Thepower supply controller of claim 100 wherein the enable/disable logiccomprises: a first NOR gate having a first input coupled to theunder-voltage comparator and having an inverted second input coupled tothe on/off circuit; and a second NOR gate having a first input coupledto the over-voltage comparator and having a second input coupled to, anoutput of the first NOR gate.
 109. The power supply controller of claim105 wherein the maximum duty cycle adjuster comprises: a fifteenthtransistor having a source coupled to the control terminal and having agate coupled to the gate and drain of the twelfth transistor; a firstdiode coupled to a drain of the fifteenth transistor; and an eighthcurrent source coupled to the drain of the fifteenth transistor. 110.The power supply controller of claim 100 wherein the control circuitcomprises: a second resistor coupled to the control terminal; asixteenth transistor having a source coupled to the second resistor anda drain coupled to the maximum duty cycle adjuster; a first comparatorhaving a first input coupled to the source of the sixteenth transistorand the second resistor, the first comparator having a second inputcoupled to a third voltage; a third resistor coupled to the drain of thesixteenth transistor; a fourth resistor coupled to the drain of thesixteenth transistor and the third resistor; a first capacitor coupledto the fourth resistor; an oscillator having an enable/disable input andfirst, second and third switching waveform outputs, the enable/disableinput of the oscillator coupled to the enable/disable logic; a fifthresistor coupled to the drain terminal; a sixth resistor coupled to thefifth resistor; a second comparator having a first input coupled to thefifth and sixth resistors and a second input coupled to the externalcurrent limit adjuster; a third comparator having a first input coupledto the third switching waveform output and having a second input coupledto the first capacitor and the fourth resistor; a leading edge blankingdelay circuit coupled to the power switch; a first AND gate having afirst input coupled to the leading edge blanking delay circuit andhaving a second input coupled to an output of the second comparator; afirst OR gate having a first input coupled to an output of the first ANDgate and having a second input coupled to an output of the thirdcomparator; a first latch having a set input coupled to the secondswitching waveform output and having a reset input coupled to an outputof the first OR gate; and a second AND gate having a first input coupledto the first switching waveform output and having a second input coupledto an output of the first latch, the second AND gate having an outputcoupled to the power switch.
 111. The power supply controller of claim110 wherein the oscillator begins generating new complete cycles offirst, second and third switching waveforms at the first, second andthird switching waveform outputs, respectively, in response to anenable/disable signal received at the enable/disable input.
 112. Thepower supply controller of claim 110 wherein the oscillator allows tocomplete existing cycles of first, second and third switching waveformsat the first, second and third switching waveform outputs, respectively,before stopping the first, second and third switching waveforms inresponse to an enable/disable signal received at the enable/disableinput.